<template>
	<div>
		<div v-if="chenload">
			<div class="chentop">
				<p class="toptitle">{{data.title}}</p>
				<div class="top-bott">
					<div>文章来源：{{data.source}}</div>
					<div>{{data.addtime}}</div>
				</div>
			</div>
			<div class="chenline"></div>
			<div class="chendetail" v-html="data.content"></div>
		</div>
		<div class="loadmore" v-else>
			<img src="../../../src/assets/img/load.gif" alt="">
		</div>
	</div>
</template>

<script>
	export default {
		name:'skilldetail',
		data() {
			return {
				chenload:true,
				id:'',
				data:'',
			};
		},
		methods:{
			newsDesc(id){
				this.axios({
					url:this.$store.state.url + "Info/newsDesc",
					params:{
						id:id
					}
				}).then(res=>{
					// console.log(res);
					this.chenload=true;
					if(res.data.errcode==0||res.data.data.errcode=='0'){
						this.data =res.data.data; 
						// console.log(data)
					}
				})
			},
		},
		mounted() {
			this.sdk.getJSSDK('','',this.$store.state.url);	
			var that = this;
			that.id=that.$route.query.id;
			that.newsDesc(that.id);
		}
	}
</script>

<style scoped="scoped">
.chentop{
	width: 6.9rem;
	margin: auto;
	padding: .3rem 0rem;
}
.toptitle{
	color: #333333;
	font-size: .3rem;
}
.top-bott{
	margin-top: .2rem;
	color: #C2C9D3;
	font-size: .24rem;
	display: flex;
	justify-content: space-between;
}
.chenline{
	width: 100%;
	height: .2rem;
	background: #f7f7f7;
}
.chendetail{
	width: 6.9rem;
	margin: auto;
	padding: .57rem 0 .65rem;
	overflow: hidden;
}
.chendetail img{
	width: 100%;
	height: 100%;
}
</style>
